package com.ebor.utils.utils;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class EmojiUtils {
    public static boolean containsEmoji(String source) {
        String patternString = "([\\x{10000}-\\x{10ffff}\ud800-\udfff])";
        Pattern pattern = Pattern.compile(patternString);
        Matcher matcher = pattern.matcher(source);
        return matcher.find();
    }

    public static void main(String[] args) {
        System.out.println(containsEmoji("\uD83E\uDDA0"));
    }
}